<?php
include_once 'session.php';
include_once '../Model/AtletaDatabase.php';

$a = unserialize($_SESSION['login']);
try{
    $db = new AtletaDataBase();
    $db->excluir($a);
    session_destroy();
    $msg = 'destroyed';
    header("location: ../View/login_cadastro/index.php?cadastro=$msg");
}  catch (Exception $e){
    echo $e->getMessage();
}
?>
